

const base = 'https://api.weixin.qq.com/cgi-bin/'
const api = {
  accessToken : base + 'token?grant_type=client_credential'
}
class Wechat{
  constructor(opts){
    this.opts = Object.assign({},opts)
    this.appID = opts.appID
    this.appSecret = opts.appSecret
    this.getAccessToken = opts.getAccessToken
    this.saveAccessToken = opts.saveAccessToken

    this.fetchAccessToken()
  }
  async request(options){
    const
  }
  async fetchAccessToken(){
    if(isValid(data)){
      return await this.updateAccessToken()
    }
  }
}
